package typeinfo;
import typeinfo.interfacea.*;
import typeinfo.packageaccess.HiddenC;

import static net.mindview.util.Print.*;
import java.lang.reflect.*;
public class HiddenImplementation {
    public static void main(String[] args) throws Exception{
        A a= HiddenC.makeA();
        a.f();
        callHiddentMethod(a,"g");
        callHiddentMethod(a,"u");
        callHiddentMethod(a,"v");
        callHiddentMethod(a,"w");
    }
    static void callHiddentMethod(Object a,String methodName) throws Exception{
        Method g=a.getClass().getDeclaredMethod(methodName);
        g.setAccessible(true);
        g.invoke(a);
    }
}
